package com.css.fxfzysx.modules.vabStructure.repository;

import com.css.fxfzysx.modules.vabStructure.entity.CztCrsEntiretyCalResult;
import com.css.fxfzysx.modules.vabStructure.vo.CrsEntiretyResultVO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CrsEntiretyCalResultRepository extends JpaRepository<CztCrsEntiretyCalResult,String> {
    public CztCrsEntiretyCalResult findByNumber(String number);

    public CztCrsEntiretyCalResult findByCalId(String calId);

//    public CrsEntiretyResultVO  findByCalId(String calId);

    @Query(nativeQuery = true ,value = " SELECT max(serial_number) FROM czt_crs_calentirety_result ")
    public Integer findMaxNum();


    @Modifying
    public void deleteByCalIdAndAndDelFlag(String calId ,String delFlag );

    @Modifying
    public void deleteByCalId(String calId);


}
